package com.lvjunxiong.serviceinterface.task;

import org.apache.log4j.Logger;



import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import java.util.Timer;

/**
 * Created by lvjunxiong on 2018/11/11.
 */
public class Lock_TokenListener implements ServletContextListener {
    private static final Logger logger = Logger.getLogger(Lock_TokenListener.class);

    public void contextInitialized(ServletContextEvent servletContextEvent) {
    	
    	System.out.println("=========开始lock_token+++++++++++++++++++++监听=========");
      	System.out.println("=========开始lock_token+++++++++++++++++++++监听=========");
      	System.out.println("=========开始lock_token+++++++++++++++++++++监听=========");
      	System.out.println("=========开始lock_token+++++++++++++++++++++监听=========");
      	System.out.println("=========开始lock_token+++++++++++++++++++++监听=========");
      	System.out.println("=========开始lock_token+++++++++++++++++++++监听=========");
        logger.info("=========开始lock_token+++++++++++++++++++++监听=========");
        Timer timer = new Timer();
      //  timer.scheduleAtFixedRate(new Lock_TaskToken3(), 1000, 1*60*1000);
      //  timer.scheduleAtFixedRate(new Lock_TaskToken(), 1000, 24 *60 * 60 * 1000);//1秒后开始，每一天执行一次
    }
    @Override
    public void contextDestroyed(ServletContextEvent servletContextEvent) {

    }
    
    
    

}

